﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Sys.Web.UI
{
    public partial class Login : Sys.ClientPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsCallback)
                if (!string.IsNullOrEmpty(Request.Form["RM"]))
                {
                    Sys.Web.RMessage<Sys.Web.Pro.User> um = Sys.Serialize.Json.GetObject<Sys.Web.RMessage<Sys.Web.Pro.User>>(Request.Form["RM"]);
                    if (!string.IsNullOrEmpty(um.Data.UserName))
                    {
                        if (Login(um.Data.UserName, um.Data.PassWord))
                        {
                            ResponseResult(true, "登陆成功");
                        }
                        else
                        {
                            ResponseResult(false, "登陆失败");
                        }
                    }
                }

            }
        
    }
}
